package com.jinniulive.platform.module.live.fragments;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioGroup;

import com.jinniulive.platform.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class SubGitfFragment extends Fragment implements RadioGroup.OnCheckedChangeListener {


    public SubGitfFragment() {
        // Required empty public constructor
    }


    private RadioGroup mRadioGroup;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_sub_gitf, container, false);
        initView(view);
        setListener();


        return view;
    }

    private void setListener() {
        mRadioGroup.setOnCheckedChangeListener(this);
    }

    private void initView(View view) {
        mRadioGroup = (RadioGroup) view.findViewById(R.id.fragment_sub_gift_rg);
    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        int type=0;
        switch (checkedId){
            case R.id.fragment_sub_gift_rb1:
                type=75;
                break;
            case R.id.fragment_sub_gift_rb2:
                type=4;
                break;
            case R.id.fragment_sub_gift_rb3:
                type=2;
                break;
            case R.id.fragment_sub_gift_rb4:
                type=88;
                break;
            case R.id.fragment_sub_gift_rb5:
                type=10;
                break;
            default:
                break;
        }
        


    }
}
